From 15bf000f557e9eb9df17897b032542d3d005a80a Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Fri, 19 Apr 2024 21:31:41 -0700
Subject: feat(badges): shadow hidden notice

---
 src/routes/user/[user]/badges/+page.svelte | 35 +++++++++++++++++++++---------
 1 file changed, 25 insertions(+), 10 deletions(-)

(limited to 'src/routes/user/[user]/badges/+page.svelte')

diff --git a/src/routes/user/[user]/badges/+page.svelte b/src/routes/user/[user]/badges/+page.svelte
index adf8651a..c7941156 100644
--- a/src/routes/user/[user]/badges/+page.svelte
+++ b/src/routes/user/[user]/badges/+page.svelte
@@ -539,15 +539,30 @@
 							{/if}
 
 							{#if isOwner}
-								<div class="card">
-									<b>Notice:</b> AniList has begun purging outbound links which contain AI-generated
-									material, this includes Badge Wall. If you have collected badges with AI-generated
-									elements, kindly use the hide feature to hide these badges from the public, while
-									allowing them to stay visible to you as the account holder.
-									<p />
-									Failure to comply with this request at your earliest convenience will result in the
-									hiding of all badges from your Badge Wall.
-								</div>
+								{@const shadowHidden =
+									ungroupedBadges.filter((badge) => badge.shadow_hidden).length > 0}
+
+								{#if shadowHidden}
+									<div class="card">
+										<b>Notice:</b> The Badge Wall overseer has detected badges containing
+										AI-generated material, and your Badge Wall has been shadow hidden.
+										<p />
+										Please use "Un-shadow Hide Badges" button to unhide your badges, from where you will
+										be required to use the hide feature to hide these badges from the public, while allowing
+										them to stay visible to you as the account holder.
+									</div>
+								{:else}
+									<div class="card">
+										<b>Notice:</b> AniList has begun purging outbound links which contain
+										AI-generated material, this includes Badge Wall. If you have collected badges
+										with AI-generated elements, kindly use the hide feature to hide these badges
+										from the public, while allowing them to stay visible to you as the account
+										holder.
+										<p />
+										Failure to comply with this request at your earliest convenience will result in the
+										hiding of all badges from your Badge Wall.
+									</div>
+								{/if}
 
 								<p />
 
@@ -594,7 +609,7 @@
 									<!-- <!-- <span style="margin: 0 0.625rem;">•</span> -->
 									<!-- <button on:click={() => exportBadges(groupedBadges)}>Export Badges</button> -->
 
-									{#if ungroupedBadges.filter((badge) => badge.shadow_hidden).length > 0}
+									{#if shadowHidden}
 										<span style="margin: 0 0.625rem;">•</span>
 										<button on:click={setShadowHide}>Un-shadow Hide Badges</button>
 									{/if}
-- 
cgit v1.2.3

